﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.U2D.Animation;

public class NewBehaviourScript : MonoBehaviour
{
    public List<SpriteResolver> spriteResolvers = new List<SpriteResolver>();

    SpriteResolver tucengfirst;

    void Start()
    {
        foreach (var resolver in FindObjectsOfType<SpriteResolver>())
        {
            spriteResolvers.Add(resolver);
            if (resolver.GetCategory() == "New Category") 
                tucengfirst = resolver;
        }
        
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.E))
        {
            if (tucengfirst.GetLabel() == "暗")
                tucengfirst.SetCategoryAndLabel(tucengfirst.GetCategory(), "艹");
            else if (tucengfirst.GetLabel() == "艹")
                tucengfirst.SetCategoryAndLabel(tucengfirst.GetCategory(), "火");
            else if (tucengfirst.GetLabel() == "火")
                tucengfirst.SetCategoryAndLabel(tucengfirst.GetCategory(), "暗");
        }


    }
}
